package jaux.tank.bean.entity.system;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

/**
 * Created  on 2018/4/2 0002.
 *
 */
@Entity
@Table(name = "t_sys_operation_log")
public class OperationLog extends EntityWithObjectId{
	@Basic
	@Column(name = "logtype")
    private String logtype;
	@Basic
	@Column(name = "logname")
    private String logname;
	@Basic
	@Column(name = "userid", length = 40)
    private String userid;
	@Basic
	@Column(name = "classname")
    private String classname;
	@Basic
	@Column(name = "method")
    private String method;
	@Basic
	@Column(name = "createtime")
    private Date createtime;
	@Basic
	@Column(name = "succeed")
    private String succeed;
	@Lob
	@Column(length = 65535,nullable = true)
    private String message;

    public String getLogtype() {
        return logtype;
    }

    public void setLogtype(String logtype) {
        this.logtype = logtype;
    }

    public String getLogname() {
        return logname;
    }

    public void setLogname(String logname) {
        this.logname = logname;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getClassname() {
        return classname;
    }

    public void setClassname(String classname) {
        this.classname = classname;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getSucceed() {
        return succeed;
    }

    public void setSucceed(String succeed) {
        this.succeed = succeed;
    }
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        OperationLog that = (OperationLog) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (logtype != null ? !logtype.equals(that.logtype) : that.logtype != null) return false;
        if (logname != null ? !logname.equals(that.logname) : that.logname != null) return false;
        if (userid != null ? !userid.equals(that.userid) : that.userid != null) return false;
        if (classname != null ? !classname.equals(that.classname) : that.classname != null) return false;
        if (method != null ? !method.equals(that.method) : that.method != null) return false;
        if (createtime != null ? !createtime.equals(that.createtime) : that.createtime != null) return false;
        if (succeed != null ? !succeed.equals(that.succeed) : that.succeed != null) return false;
        if (message != null ? !message.equals(that.message) : that.message != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (logtype != null ? logtype.hashCode() : 0);
        result = 31 * result + (logname != null ? logname.hashCode() : 0);
        result = 31 * result + (userid != null ? userid.hashCode() : 0);
        result = 31 * result + (classname != null ? classname.hashCode() : 0);
        result = 31 * result + (method != null ? method.hashCode() : 0);
        result = 31 * result + (createtime != null ? createtime.hashCode() : 0);
        result = 31 * result + (succeed != null ? succeed.hashCode() : 0);
        result = 31 * result + (message != null ? message.hashCode() : 0);
        return result;
    }
    
}
